<template>
    <div class="imgs">
        <swiper :options="swiperOption">
            <swiper-slide v-for="(item,index) in swiperList.results" :key="index">
                <img :src="item.imgUrl">
            </swiper-slide>
            <div class="swiper-pagination" slot="pagination"></div>
        </swiper>
    </div>
</template>
<script>
import {mapState,mapActions} from "vuex";
export default {
    props:{

    },
    components:{

    },
    data(){
        return {
            swiperOption: {
                pagination:{
                    el:".swiper-pagination"
                },
                loop:true,
                autoplay:{
                     delay:2000
                }
            }
        }
    },
    computed:{
          ...mapState(['swiperList'])
    },
    methods:{
         ...mapActions(['getSwiperFn'])
    },
    created(){
       this.getSwiperFn()
    },
    mounted(){
        
    }
}
</script>
<style scoped lang="scss">
@import "~@/scss/common.scss";
.imgs{
    width:100%;
    height:pxTorem(120px);
    margin-top:pxTorem(2px);
    img{
       width:100%;
       height:pxTorem(120px);
    }
}
</style>